<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
    
   <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--设置标签图标-->
    <link href="favicon.ico" rel="shortcut icon">
    <link rel="stylesheet" href="css/header.css">
    <link rel="stylesheet" href="css/index.css">
</head>
<body>
<jsp:include page="header.jsp"></jsp:include>

<!--广告-->
<div id="ad">
    <img src="images/goods/ad1.jpg" alt="">
</div>
<!--秒杀-->
<div id="ms">
    <div class="ms_top">
        <span>码蚁秒杀</span>
        <span>总有你想不到的低价</span>
    </div>
    <div class="ms_body">
        <c:forEach items="${Show}" var="good">
        		<li>
        			<a href="DetailServlet?id=${good.getPid()}">
        				<img src='images/goods/${good.getPimage()}' alt='' style="width: 200px; height: 200px;">
        				<br>
        				<span>${good.getPname()}</span>
        				<br>
        				<i class="yuan">￥</i><span class="price"><fmt:formatNumber
								type="number" pattern="0.00" value="${good.getPprice()*0.8 } "
								maxFractionDigits="2" /></span>
        			</a>	
        		</li>
        </c:forEach>
    </div>
</div>
<!--热卖-->
<div id="hot_goods">
    <h3>热卖商品</h3>
    <div class="hot_goods_body">	
       <c:forEach items="${Goods}" var="good">
        		<li>
        			<a href="DetailServlet?id=${good.getPid()}">
        				<img src='images/goods/${good.getPimage()}' alt=''>
        				<br>
        				<span>${good.getPname()}</span>
        				<br>
        				<i class="yuan">￥</i><span class="price"><fmt:formatNumber
								type="number" pattern="0.00" value="${good.getPprice()*0.8 } "
								maxFractionDigits="2" /></span>
        			</a>	
        		</li>
        </c:forEach>
    </div>
</div>
</body>
</html>